<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('执行销售订单')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-order-execute">
            <input name="orderId" type="hidden" th:value="${orderId}" />
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">财务账户：</label>
                <div class="col-sm-8">
                    <select name="accountId" class="form-control select2-selection" required>
                        <option value="">请选择财务账户</option>
                        <option th:each="account : ${accounts}" th:value="${account.id}" th:text="${account.name}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">执行备注：</label>
                <div class="col-sm-8">
                    <textarea name="executionRemark" class="form-control" placeholder="请输入执行备注" required></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "sales/execution";
        
        $("#form-order-execute").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/executeOrder", $('#form-order-execute').serialize());
            }
        }
        
        $(function() {
            $("select.form-control").select2({
                placeholder: "请选择",
                allowClear: true
            });
        });
    </script>
</body>
</html> 